vif = p->net_vif_list[info->vif];
- if(vif == NULL)
+ if ( vif == NULL )
+ {
+ put_task_struct(p);
return -ENOSYS;
+ }
info->total_bytes_sent = vif->total_bytes_sent;
info->total_bytes_received = vif->total_bytes_received;
dom, mcu_adv, warp, warpl, warpu);
p = find_domain_by_id(dom);
- if ( p == NULL ) return -ESRCH;
+ if ( p == NULL )
+ return -ESRCH;
spin_lock_irq(&schedule_data[p->processor].lock);
-
p->mcu_advance = mcu_adv;
-
spin_unlock_irq(&schedule_data[p->processor].lock);
+ put_task_struct(p);
+
return 0;
}
void schedulers_start(void)
{
printk("Start schedulers\n");
- __cli();
sched_timer(0);
virt_timer(0);
smp_call_function((void *)sched_timer, NULL, 1, 1);
- __sti();
}
{
unsigned char status, scancode;
unsigned int work = 1000;
- unsigned long cpu_mask, flags;
+ unsigned long cpu_mask = 0, flags;
+ struct task_struct *p = CONSOLE_OWNER;
spin_lock_irqsave(&kbd_lock, flags);
while ( (--work > 0) && ((status = kbd_read_status()) & KBD_STAT_OBF) )
- {
+ {
scancode = kbd_read_input();
#ifdef CONFIG_XEN_ATTENTION_KEY
}
#endif
- kbd_ring_push(status, scancode);
- cpu_mask = mark_guest_event(CONSOLE_OWNER, _EVENT_KBD);
- guest_event_notify(cpu_mask);
+ if ( p != NULL )
+ {
+ kbd_ring_push(status, scancode);
+ cpu_mask |= mark_guest_event(CONSOLE_OWNER, _EVENT_KBD);
+ }
}
if ( !work )
printk(KERN_ERR "xen_keyb: controller jammed (0x%02X).\n", status);
spin_unlock_irqrestore(&kbd_lock, flags);
+
+ if ( p != NULL )
+ {
+ put_task_struct(p);
+ guest_event_notify(cpu_mask);
+ }
}